package com.maila.xiaoaoschool.activity;

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

import com.maila.xiaoaoschool.R;
import com.zhy.autolayout.AutoLinearLayout;
import com.zhy.autolayout.AutoRelativeLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/9/28.
 */

public class ExpressActivity extends AppCompatActivity {
    @BindView(R.id.white_return_iv)
    AutoRelativeLayout whiteReturnIv;
    @BindView(R.id.tv_shop_namee)
    TextView tvShopNamee;
    @BindView(R.id.tv_good)
    TextView tvGood;
    @BindView(R.id.v_good)
    View vGood;
    @BindView(R.id.rl_good)
    AutoRelativeLayout rlGood;
    @BindView(R.id.tv_comment)
    TextView tvComment;
    @BindView(R.id.v_comment)
    View vComment;
    @BindView(R.id.rl_comment)
    AutoRelativeLayout rlComment;
    @BindView(R.id.ll_menu)
    AutoLinearLayout llMenu;
    @BindView(R.id.ll_title)
    AutoLinearLayout llTitle;
    @BindView(R.id.iv_song1)
    ImageView ivSong1;
    @BindView(R.id.tv_address)
    TextView tvAddress;
    @BindView(R.id.tv_name)
    TextView tvName;
    @BindView(R.id.ll_choose_address)
    AutoRelativeLayout llChooseAddress;
    @BindView(R.id.iv_qu1)
    ImageView ivQu1;
    @BindView(R.id.et_qu_address)
    EditText etQuAddress;
    @BindView(R.id.et_qu_code)
    EditText etQuCode;
    @BindView(R.id.et_qu_wupin)
    EditText etQuWupin;
    @BindView(R.id.ll_choose)
    AutoLinearLayout llChoose;
    @BindView(R.id.et_fee)
    EditText etFee;
    @BindView(R.id.ll_fee)
    AutoLinearLayout llFee;
    @BindView(R.id.ll_qu)
    AutoLinearLayout llQu;
    @BindView(R.id.iv_song2)
    ImageView ivSong2;
    @BindView(R.id.rl_choose_qu_address)
    AutoRelativeLayout rlChooseQuAddress;
    @BindView(R.id.et_song_wupin)
    EditText etSongWupin;
    @BindView(R.id.ll_choose_address2)
    AutoLinearLayout llChooseAddress2;
    @BindView(R.id.iv_song3)
    ImageView ivSong3;
    @BindView(R.id.rl_edit_info)
    AutoRelativeLayout rlEditInfo;
    @BindView(R.id.rl_choose_express)
    AutoRelativeLayout rlChooseExpress;
    @BindView(R.id.ll_song)
    AutoLinearLayout llSong;
    int type=0;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_express);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.rl_good,R.id.rl_comment,R.id.white_return_iv, R.id.ll_choose_address, R.id.rl_choose_qu_address, R.id.rl_choose_express})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.white_return_iv:
                finish();
                break;
            case R.id.rl_good:
                type=0;
                setstatus();
                break;
            case R.id.rl_comment:
                type=1;
                setstatus();
                break;
            case R.id.ll_choose_address:
                break;
            case R.id.rl_choose_qu_address:
                break;
            case R.id.rl_choose_express:
                break;
        }
    }

    private void setstatus() {
        if(type==0){
            tvComment.setTextColor(Color.parseColor("#666666"));
            vComment.setVisibility(View.GONE);
            vGood.setVisibility(View.VISIBLE);
            tvGood.setTextColor(Color.parseColor("#f2673e"));
            llQu.setVisibility(View.VISIBLE);
            llSong.setVisibility(View.GONE);
        }else {
            tvComment.setTextColor(Color.parseColor("#f2673e"));
            vComment.setVisibility(View.VISIBLE);
            vGood.setVisibility(View.GONE);
            tvGood.setTextColor(Color.parseColor("#666666"));
            llQu.setVisibility(View.GONE);
            llSong.setVisibility(View.VISIBLE);
        }

    }
}
